<!--<?php
print <<<EOT
-->

<script src="../css/edit.js"></script>
<script>
<!--

function validate(form) {

	if(form.name.value.length < 2 || form.name.value.length > 100) {
		showMsg('msg_area', 'Country must be no more than 100 characters.');
		form.name.focus();
		return false;
	}
	if(form.description.value.length > 250) {
		showMsg('msg_area', 'Description must be no more than 250 characters.');
		form.description.focus();
		return false;
	}
	if (!isDigit(form.seq.value)) {
	    showMsg('msg_area', 'Sequence must be a nunber.');
		form.seq.focus();
		return false;
	}
	
	return true;
}

//-->
</script>

<!--Content Start-->
<table width="95%" border="0" align="center">
  <tr> 
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td>
      <table width="60%" border="0" align="left" cellpadding="3" cellspacing="3">
        <tr> 
          <td>
          
            <span id="msg_area" class="js_msg">$alert_message</span>
            
            <table border="0" cellspacing="1" cellpadding="1">
              <tr>
                <td width="50%">
                  <form name="form1" method="post" action="i_photo_add.php">
                  <table border="0" cellspacing="1" cellpadding="1">
                    <tr> 
                      <td><!--input type="text" class="text" name="name" size="20" value="Enter name ..." onFocus="form1.name.value=''"--></td>
                      <td><input name="image" type="image" onclick="form1.submit" src="../images/admin/bt_add.gif"></td>
			          <td><img src="../images/admin/shim.gif" width=30></td>
                    </tr>
                  </table>
                  </form>
                </td>
                <td align="right">
                <form name="form2" method="post" action="i_photo.php" onsubmit="return validate_search(this, '$key')">
                  <table border="0" cellspacing="1" cellpadding="1">
                    <tr>
                      <td><input type="text" class="text" name="key" size="20" value="$key" onFocus="form2.key.value='';return false"><input type="hidden" name="action" value="search"></td>
			          <td><input name="image" type="image" src="../images/admin/bt_search.gif" onclick="form2.submit;"></td>
			          <td><input name="image" type="image" src="../images/admin/bt_listall.gif" onClick="location.href='i_photo.php';return false"></td>
                    </tr>
                  </table>
                  </form>
			    </td>
              </tr>
            </table>
            
            
            <span id="edit_area"></span>
            
            $page_show

            <table width="100%" border="0" cellspacing="1" cellpadding="1" class="tb">
              <tr class="tbheader"> 
		        <td width="25%">name</td>
		      
			    <td width="30%">Category</td>
			<!--    <td >name Chinese</td>
			    <td width="30%">Category Chinese</td>-->
			    <td width="25%">Picture</td>
			    <td width="5%">Sequence</td>
			    <td ></td>
              </tr>

<!--
EOT;
for($i=0; $i<count($out_ary); $i++){
print <<<EOT
-->
              
              <tr class="tbcontent1"> 
		        <td>{$out_ary[$i]['name']}</td>		       
                <td>{$photo_category_ary[$out_ary[$i]['photo_category_id']]}</td>
            <!--     <td>{$out_ary[$i]['namezh']}</td>
                 <td>{$photo_category_aryzh[$out_ary[$i]['photo_category_id']]}</td>-->
                <td align="center"><img src="../zh/attachments/{$out_ary[$i]['pic']}" width="100" height="100" border="0"></td>
                <td>{$out_ary[$i]['seq']}</td>                             
			    <td align=center bgcolor="ECECEC">
			    <a href="javascript:getAdminEdit('edit_area', '9', '{$out_ary[$i]['id']}')"><img src="../images/admin/bt_edit.gif" border="0" alt="Edit"></a>
			    <a href="i_photo.php?action=del&pid={$out_ary[$i]['id']}" onclick="return confirm('Delete {$out_ary[$i]['name']}?')"><img src="../images/admin/bt_delete.gif" border="0" Alt="Delete"></a>
			    </td>
              </tr>

<!--
EOT;
} print <<<EOT
--> 

                            
            </table>

            $page_show

          </td>
        </tr>
      </table>
      
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p></td>
  </tr>
</table>
<!--Content End-->

<!--
EOT;
?>-->